#!/usr/bin/env python

import os
import sys
import subprocess
import gmsh

# Gmsh and system lib directory
dirname, _ = os.path.split(gmsh.__file__)

# Set environment
envvar = 'PATH' if 'win' in sys.platform else 'LD_LIBRARY_PATH'
envval = os.environ[envvar] if envvar in os.environ.keys() else ''
#
os.environ[envvar] = dirname + os.pathsep + envval

# Run Gmsh command
command = os.path.join(dirname, '../bin/gmsh')
subprocess.call([command] + sys.argv[1:])



